﻿using PetaPoco;
using PmSoft;
using PmSoft.Caching;
using System.ComponentModel;
using static Modules.Person.PersonConstants;

namespace Modules.Person;

/// <summary>
/// 人员证书类型字典表
///</summary>
[TableName("person_certificate_dist")]
[Description("人员证书类型字典表")]
[PrimaryKey("id", AutoIncrement = true)]
[CacheSetting(true)]
[Serializable]
public class PersonCertificateDist : IEntity
{
    /// <summary>
    /// 主键
    ///</summary>
    [Column("id")]
    public string Id { get; set; }

    /// <summary>
    /// 父级id
    ///</summary>
    [Column("parent_id")]
    public string ParentId { get; set; }

    /// <summary>
    /// 级别
    ///</summary>
    [Column("level")]
    public int Level { get; set; }

    /// <summary>
    /// 类型（1类型，2专业 ，3状态， 4等级）
    /// 默认值: 1
    ///</summary>
    [Column("type")]
    public 证书字典类型 Type { get; set; }

    /// <summary>
    /// 类型编码
    ///</summary>
    [Column("code")]
    public string Code { get; set; }

    /// <summary>
    /// 名称
    ///</summary>
    [Column("name")]
    public string Name { get; set; }

    #region IEntity 成员

    [Ignore]
    object IEntity.EntityId { get { return this.Id; } }

    #endregion IEntity 成员
}